package top.kaoshanji.p2ch18a;

/**
 * 代码清单-p2ch18a-205页a：精囊
 * @author kaoshanji
 * ^_^
 * create time 2025/3/24 14:19
 */
public class Context {

    private IStrategy strategy;

    // 构造函数，你要使用哪个妙计
    public Context(IStrategy strategy) {
        this.strategy = strategy;
    }

    // 使用计谋了，看我出招了
    public void operate() {
        this.strategy.operate();
    }

}
